<template>
    <div class="select_box">
        <el-select clearable placeholder="请选择跳转二级页面"  v-bind:value="value"  @change="changes">
            <el-option v-for="(item,index) in options" :key="index" :label="item.label" :value="item.value"></el-option>
        </el-select> 
    </div>
</template>
<script>
import { getStore } from '@/utils/store';
export default {
    props:{
        value:[String,Number]
    },
    model:{
        prop: 'value',
        event: 'change'
    },
    data(){
        return {
            options:[],
        }
    },
    methods:{
        changes(e){
            this.$emit('change',e);
        }
    },
    mounted() {
        let list = getStore('secondList');
        this.options = list.length ?  list.map((val)=>{
            return {
                label:val.contentName,
                value:val.id
            }
        }) : []
    },
}
</script>